/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.com.educacionit.webprogramming.abcm.modelo;

/**
 *
 * @author marcos
 */
public class Acciones {
    
    public static String consultar(String id, String nombre, String apellido){
        String consulta = "select * from alumnos where ";
        
        if(!id.isEmpty()){
            consulta+="alumno_id = "+id;
        }
        else{
            consulta+="nombre like "+nombre+"% and apellido like "+apellido+"%";
        }
        return consulta;
    }
}
